const $axios = require("w-vue-middle/api/axios").default;

/**
 * @Author: y_zp
 * @description: 调度任务:任务信息CRON翻译
 */
export function translateCron(params = {
  cron: undefined
}) {
  return $axios({
      url: `${appService.dispatchCenterService}/api/v1/jobInfoAll/translate`,
      method: 'post',
      data: params
  })
}

/**
 * @Author: y_zp
 * @description:获取任务管理列表
 */
export function getJobList(params = {
  pageNum: 1,
  pageSize: 10,
  queryParams: {
      F_appName_like: undefined, //appName
      F_title_like: undefined //名称
  }
}) {
  return $axios({
      url: `${appService.dispatchCenterService}/api/v1/jobExcutor/list`,
      method: 'post',
      data: params
  })
}

/**
 * @Author: y_zp
 * @description: 批量执行
 */
export function batchExecute(params = []) {
  return $axios({
    url: `${$service.dispatchCenterService}/api/v1/jobInfoAll/batch/trigger`,
    method: 'post',
    data: params,
  });
}